package org.example.projecttwo.mapper.news;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.example.projecttwo.entity.news.News;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 新闻基础信息表 Mapper 接口
 * </p>
 *
 * @author nn
 * @since 2025-11-01
 */
public interface NewsMapper extends BaseMapper<News> {

    /**
     * 增加新闻浏览量
     * @param id 新闻ID
     */
    void increaseViewCount(Long id);
    String selectMaxNewsNo();
    Map<String, Integer> getNewsStatistics(Long newsId);
    void batchPermanentlyDelete(@Param("ids") List<Long> ids);
}